{extend name="public/info_base"}

{block name="title"}
中国酒业兄弟连一成员申报
{/block}

{block name="style"}
<link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
<link rel="stylesheet" href="__STATIC__/home/css/summary.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/home/jquery_weui/css/jquery-weui.min.css">
<style>
    @media screen and (min-width: 500px) {
        .layui-form-label {
            width: 110px;
        }

        .summary_rt, .top_two, .main_detail {
            width: 1024px;
            box-sizing: border-box;
        }

        .layui-input-block {
            margin-left: 140px;
        }
    }
    @media screen and (max-width: 500px) {
        .main_detail {
            padding: 0;
        }
        .articleList-little_top {
            box-sizing: border-box;
        }
        .articleList-little {
            width: 100vw;
        }
        .layui-form-item .layui-form-label, .layui-input, .layui-upload-icon, textarea {
            font-size: .65rem;
        }
    }
</style>
{/block}

{block name="body"}
<div class="articleList-big">
    {include file="public/header" /}
    {include file="public/nav" /}
    {include file="public/banner" /}
    <div class="main">
        <div class="summary_rt">
            <div class="summary_rt_a">
                <div class="toRight"></div>
                <div class="summary_rt_top">
                    <span class="top_san"></span>
                    <span>当前位置 : </span>
                    <span>首页 </span>
                    <span class="cl-9d">&gt;  中国酒业兄弟连 </span>
                    <span class="cl-9d">&gt;  成员申报 </span>
                </div>
            </div>
            <!--常规-->
            <div class="top_two active">
                <span class="top_two_img"></span>
                <span class="cl-9d">成员申报</span>
            </div>
            <div class="main_detail">
                <div class="title">
                    <h2>{$data.title}</h2>
                </div>

                <div class="content">
                    <form class="layui-form" action="{:url('zltb_save')}" method="post">
                        <div class="layui-form-item">
                            <label class="layui-form-label">推荐人：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="recommend" placeholder="推荐人姓名" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">推荐人电话：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="recommendtel" placeholder="推荐人电话" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">申报人姓名：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="name" lay-verify="required" placeholder="兄弟姓名（必填）" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">性别：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="sex" value="男" title="男" checked="" style="display: none">
                                <input type="radio" name="sex" value="女" title="女" style="display: none">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">民族：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="national" lay-verify="required" placeholder="民族（必填）" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">出生年月：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="birthday" lay-verify="required|date" onclick="layui.laydate({elem:this})" placeholder="出生年月（必填）" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">身高：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="height" lay-verify="required" placeholder="身高cm（必填）" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">所属大区联队：</label>
                            <div class="layui-input-inline">
                                <!-- <input type="text" id="united" name="enterprise" lay-verify="required" placeholder="所属大区联队（必填）" autocomplete="off" class="layui-input">-->
                                <select name="united" style="display: none" lay-verify="required">
                                    <option value="">请选择</option>
                                    {foreach name='list' item='vo'}
                                    <option value="{$vo.id}">{$vo.region}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">省、市、区：</label>
                            <div class="layui-input-inline">
                                <select name="province" lay-filter="select_change" style="display: none" lay-verify="required">
                                    <option value="">请选择省</option>
                                    {volist name="provinces" id="vo"}
                                    <option value="{$vo.region_id}">{$vo.region_name}</option>
                                    {/volist}
                                </select>
                            </div>
                            <div class="layui-input-inline">
                                <select name="city" lay-filter="select_change"  style="display: none" lay-verify="required">
                                    <option value="">请选择市</option>
                                </select>
                            </div>
                            <div class="layui-input-inline">
                                <select name="area" style="display: none" lay-verify="required">
                                    <option value="">请选择县/区</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">现居住地：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="live" lay-verify="required" placeholder="现居住地（必填）" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">籍贯：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="native" lay-verify="required" placeholder="籍贯（必填）" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">电话：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="tel" lay-verify="required|mobile" placeholder="电话（必填）" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">邮箱：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="email" lay-verify="required|email" placeholder="邮箱（必填）" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">兄弟连职务：</label>
                            <div class="layui-input-inline">
                                <select name="duty" style="display: none">
                                    <option value="">请选择</option>
                                    {foreach name='res' item='vo'}
                                    <option value="{$vo.id}">{$vo.position}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">QQ号码：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="qq" lay-verify="required" placeholder="QQ联系（必填）" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">紧急联系人：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="contact" lay-verify="required" placeholder="紧急联系人（必填）" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">紧急联系人电话：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="contactel" lay-verify="required|mobile" placeholder="电话（必填）" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">照片（头像）：</label>
                            <div class="site-demo-upload">
                                <!--<img id="LAY_demo_upload" src="__STATIC__/home/images/jx_beta.png">-->
                                <img class="head" src="__STATIC__/home/images/tui_03.jpg" style="width:50px;height:50px; border-radius: 100%;">
                                <input type="file" name="image" class="layui-upload-file">
                                <input type="hidden" name="head" value="" lay-verify="required"/>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">学历：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="education" placeholder="学历" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">专业：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="majors" placeholder="专业" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">政治面貌：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="politik"  placeholder="政治面貌" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">毕业学校：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="school" placeholder="毕业学校" autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">工作经历：</label>
                            <div class="layui-input-block">
                                <textarea name="experience" class="layui-textarea" placeholder="工作经历" ></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">兴趣爱好：</label>
                            <div class="layui-input-block">
                                <textarea name="hobby" class="layui-textarea" placeholder="兴趣爱好" ></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">个人荣誉：</label>
                            <div class="layui-input-block">
                                <textarea name="practice" class="layui-textarea" placeholder="社会实践" ></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">个性评价：</label>
                            <div class="layui-input-block">
                                <textarea name="evaluation" class="layui-textarea" placeholder="个性评价"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <input type="hidden" name="activity_id" value="{$data.id}">
                                <button class="layui-btn" lay-submit="" lay-filter="send_form">立即提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    {include file="public/footer" /}
</div>
<div class="articleList-little">
    <div class="articleList-little_top">
        <span>中国酒业兄弟连 </span>
        <span class="cl-9d">&gt; 成员申报 </span>
    </div>
    <div class="main_detail">
        <div class="title">
            <h2>
                {$data.title}
            </h2>
        </div>
        <div class="content">
            <form class="layui-form" action="{:url('zltb_save')}" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">推荐人：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="recommend" placeholder="推荐人姓名" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">推荐人电话：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="recommendtel" placeholder="推荐人电话" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">申报人姓名：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="name" lay-verify="required" placeholder="兄弟姓名（必填）" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">性别：</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="男" title="男" checked="" style="display: none">
                        <input type="radio" name="sex" value="女" title="女" style="display: none">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">民族：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="national" lay-verify="required" placeholder="民族（必填）" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">出生年月：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="birthday" lay-verify="required|date" onclick="layui.laydate({elem:this})" placeholder="出生年月（必填）" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">身高：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="height" lay-verify="required" placeholder="身高cm（必填）" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">所属大区联队：</label>
                    <div class="layui-input-inline">
                        <!-- <input type="text" id="united" name="enterprise" lay-verify="required" placeholder="所属大区联队（必填）" autocomplete="off" class="layui-input">-->
                        <select name="united" style="display: none" lay-verify="required">\
                            <option value="">请选择（必填）</option>
                            {foreach name='list' item='vo'}
                            <option value="{$vo.id}">{$vo.region}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">省、市、区：</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" id="addressDetail" placeholder="请选择（必填）"/>
                        <input name="address" type="hidden" value="" lay-verify="required"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">现居住地：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="live" lay-verify="required" placeholder="现居住地（必填）" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">籍贯：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="native" lay-verify="required" placeholder="籍贯（必填）" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">电话：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="tel" lay-verify="required|mobile" placeholder="电话（必填）" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">邮箱：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="email" lay-verify="required|email" placeholder="邮箱（必填）" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">兄弟连职务：</label>
                    <div class="layui-input-inline">
                        <select name="duty" style="display: none">
                            <option value="">请选择（必填）</option>
                            {foreach name='res' item='vo'}
                            <option value="{$vo.id}">{$vo.position}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">QQ号码：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="qq" lay-verify="required" placeholder="QQ联系（必填）" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">紧急联系人：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="contact" lay-verify="required" placeholder="紧急联系人（必填）" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">紧急联系人电话：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="contactel" lay-verify="required|mobile" placeholder="电话（必填）" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">照片（头像）：</label>
                    <div class="site-demo-upload">
                        <!--<img id="LAY_demo_upload" src="__STATIC__/home/images/jx_beta.png">-->
                        <img class="head" src="__STATIC__/home/images/tui_03.jpg" style="width:50px;height:50px; border-radius: 100%;">
                        <input type="file" name="image" class="layui-upload-file" accept="image/*">
                        <input type="hidden" name="head" value=""  lay-verify="required"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">学历：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="education" placeholder="学历" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">专业：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="majors" placeholder="专业" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">政治面貌：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="politik" placeholder="政治面貌" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">毕业学校：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="school"  placeholder="毕业学校" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">工作经历：</label>
                    <div class="layui-input-block">
                        <textarea name="experience" class="layui-textarea" placeholder="工作经历" ></textarea>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">兴趣爱好：</label>
                    <div class="layui-input-block">
                        <textarea name="hobby" class="layui-textarea" placeholder="兴趣爱好"></textarea>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">个人荣誉：</label>
                    <div class="layui-input-block">
                        <textarea name="practice" class="layui-textarea" placeholder="社会实践"></textarea>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">个性评价：</label>
                    <div class="layui-input-block">
                        <textarea name="evaluation" class="layui-textarea" placeholder="个性评价"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <input type="hidden" name="activity_id" value="{$data.id}">
                        <button class="layui-btn" lay-submit="" lay-filter="send_form">立即提交</button>
                    </div>
                </div>
            </form>
        </div>

        <div style="width: 7rem; height:7rem; display: block; margin: 1rem auto;" >
            <img src="__STATIC__/home/images/top5.png"/>
        </div>
    </div>
</div>
{/block}

{block name="javascript"}
{notempty name="signPackage"}
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    wx.config({
            //debug: true,
            appId: '{$signPackage.appId}',
            timestamp: {$signPackage.timestamp},
        nonceStr:'{$signPackage.nonceStr}',
        signature: '{$signPackage.signature}',
        jsApiList: [
        // 所有要调用的 API 都要加到这个列表中
        'checkJsApi',
        'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'hideMenuItems'
    ]
    });
    wx.ready(function () {
        // 在这里调用 API
        wx.checkJsApi({
            jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'hideMenuItems'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
            success: function(res) {
//                alert(res.checkResult.onMenuShareTimeline);
//                alert(res.errMsg);
                //console.log(res);
                // 以键值对的形式返回，可用的api值true，不可用为false
                // 如：{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
            }
        });

        wx.onMenuShareTimeline({
            title: '中国酒业兄弟连一成员申报', // 分享标题
            desc : '为了兄弟连更好的开展工作，请兄弟连兄递认真填写个人资料，辛苦了！',
            link: window.location.href, // 分享链接
            imgUrl: 'http://'+window.location.host+'/{$data.image|default="static/home/images/lo_03.png"}', // 分享图标
            success: function () {
                alert('成功');
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                alert('取消');
                // 用户取消分享后执行的回调函数
            }
        });

        wx.onMenuShareAppMessage({
            title: '中国酒业兄弟连一成员申报', // 分享标题
            desc : '为了兄弟连更好的开展工作，请兄弟连兄递认真填写个人资料，辛苦了！',
            link: window.location.href, // 分享链接
            imgUrl: 'http://'+window.location.host+'/{$data.image|default="static/home/images/lo_03.png"}', // 分享图标
            type: '', // 分享类型,music、video或link，不填默认为link
            dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
            success: function () {
                alert('成功');
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                alert('取消');
                // 用户取消分享后执行的回调函数
            }
        });
        wx.hideMenuItems({
            menuList: ['menuItem:share:qq', 'menuItem:share:weiboApp', 'menuItem:favorite', 'menuItem:share:QZone', "menuItem:copyUrl", 'menuItem:openWithQQBrowser', 'menuItem:share:email', 'menuItem:openWithSafari'] // 要显示的菜单项，所有menu项见附录3
        });
    });
</script>
{/notempty}

<script src="__STATIC__/layui/layui.js" charset="utf-8"></script>

<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script type="text/javascript" src="__STATIC__/home/jquery_weui/lib/jquery-2.1.4.js"></script>
<!-- jquery-weui.min.js -->
<script type="text/javascript" src="__STATIC__/home/jquery_weui/js/jquery-weui.min.js"></script>
<script src="__STATIC__/home/jquery_weui/js/data-picker1.js"></script>
<script src="__STATIC__/home/jquery_weui/js/city-picker.js"></script>
<script>
    $(function () {
        $("#addressDetail").cityPicker({
            title: "请选择收货地址",
            onChange: function (picker, values, displayValues) {
                console.log(values, displayValues);
                $('input[name="address"]').val($("#addressDetail").attr('data-codes'));
            }
        });


    });

    layui.use(['form', 'laydate', 'upload'], function(){
        var form = layui.form()
            ,layer = layui.layer
            ,upload = layui.upload
            ,laydate = layui.laydate;

        var obj = {
            head_index : ''
        };
        //实例化一个上传控件
        upload({
            url: '{:url("base/upload_image")}'
            ,success: function(data){
                layer.close(obj.head_index);
                if (data.code == 200) {
                    $(".head").attr('src', data.data[0].host_path);
                    $("input[name='head']").val(data.data[0].thumb_path);
                } else {
                    layer.msg(data.msg);
                }
            }
        });

        $('.layui-upload-file').change(function () {
            obj.head_index = layer.msg('正在上传，请稍候',{icon: 16,time:false,shade:0.8});
        });

        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 5){
                    return '标题至少得5个字符啊';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });

        /**
         * 表单提交
         */
        form.on("submit(send_form)",function(data){
            //弹出loading
            var submit_layer = top.layer.msg('数据提交中，请稍候',{icon: 16,time:false,shade:0.8});
            var _form = $(data.form);
            $.ajax({
                type : _form.attr('method'),
                url : _form.attr('action'),
                data : _form.serialize(),
                dataType : 'json',
                success : function (msg) {
                    top.layer.close(submit_layer);
                    layer.close(submit_layer);
                    if (msg.code == 200) {
                        layer.msg("提交成功！");
                        setTimeout(function () {
                            window.location.reload();
                        }, 888);
                    } else {
                        layer.msg(msg.msg);
                    }
                }
            });
            return false;
        });

        form.on('select(select_change)', function(data){
            $.get('{:url("get_regions")}', {pid : data.value}, function (msg) {
                console.log(msg);
                var len = msg.length;
                var html = [];
                if (data.elem.name == 'province') {
                    html.push('<option value="">请选择市</option>')
                } else {
                    html.push('<option value="">请选择县/区</option>')
                }
                for (var i = 0; i < len; i++) {
                    html.push('<option value="'+ msg[i].region_id +'">'+ msg[i].region_name +'</option>')
                }
                if (data.elem.name == 'province') {
                    $("select[name='city']").html(html.join(''));
                } else {
                    $("select[name='area']").html(html.join(''));
                }
                form.render('select');
            }, 'json');
        });
    });
</script>
{/block}